# from pymysql import *
# def main():
#     con = connect(host="localhost",port=3306,user="root",password="mysql",database="xyy",charset="utf8")
#     cs1 = con.cursor()
#     count = cs1.execute("select name from goods where price > 4500.00")
#     for result in range(count):
#         result = cs1.fetchone()
#         print(result)
#     cs1.close()
#     con.close()
# if __name__ == '__main__':
#     main()



# from pymysql import *
# def main():
#     con = connect(host="localhost",port=3306,user="root",password="mysql",database="xyy",charset="utf8")
#     cs = con.cursor()
#     count = cs.execute('insert into goods(name,cate_name,brand_name) values("联想小新14","商务本",4)')
#     print(count)
#     con.commit()
#     cs.close()
#     con.close()
# if __name__ == '__main__':
#     main()


from pymysql import *
def main():
    con = connect(host="localhost",port=3306,user="root",password="mysql",database="xyy",charset="utf8")
    cs = con.cursor()
    count = cs.execute('update goods set price=5299 where price=0')
    print(connect)
    con.commit()
    cs.close()
    con.close()
if __name__ == '__main__':
    main()